<?php

namespace app\model\zs;

use think\facade\Db;
use think\Model;

class ZsMemberPlugInviteItem extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'member_plug_invite_items';

    // 设置当前模型的数据库连接
    protected $connection = 'zs';

    const STATUS_OFF = 0;
    const STATUS_ON = 1;

    const RANGE_TYPE_SPEC = 1;
    const RANGE_TYPE_FOREVER = 2;

    public static function statusRels()
    {
        return [
            static::STATUS_OFF => '禁用',
            static::STATUS_ON => '启用',
        ];
    }

    public static function statusClassRels()
    {
        return [
            static::STATUS_OFF => 'color-red',
            static::STATUS_ON => 'color-green',
        ];
    }

    public static function rangeRels()
    {
        return [1 => '指定时间', 2 => '永久有效'];
    }
}
